<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Poll the channels/listeners/streams for events</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="function.ssh2-methods-negotiated.html">« ssh2_methods_negotiated</a></li>
      <li style="float: right;"><a href="function.ssh2-publickey-add.html">ssh2_publickey_add »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="ref.ssh2.html">SSH2 函数</a></li>
    <li>Poll the channels/listeners/streams for events</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="function.ssh2-poll" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">ssh2_poll</h1>
  <p class="verinfo">(PECL ssh2 &gt;= 0.9.0)</p><p class="refpurpose"><span class="refname">ssh2_poll</span> &mdash; <span class="dc-title">Poll the channels/listeners/streams for events</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.ssh2-poll-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>ssh2_poll</strong></span>(<span class="methodparam"><span class="type">array</span> <code class="parameter reference">&$desc</code></span>, <span class="methodparam"><span class="type">int</span> <code class="parameter">$timeout</code><span class="initializer"> = 30</span></span>): <span class="type">int</span></div>

  <p class="para rdfs-comment">
   Polls the channels/listeners/streams for events,
   and returns the number of descriptors which returned non-zero revents.
  </p>

  <div class="warning"><strong class="warning">警告</strong><p class="simpara">本函数还未编写文档，仅有参数列表。</p></div>

 </div>


 <div class="refsect1 parameters" id="refsect1-function.ssh2-poll-parameters">
  <h3 class="title">参数</h3>
  <dl>
   
    <dt>
<code class="parameter">desc</code></dt>

    <dd>

     <p class="para">
      An indexed array of subarrays with the keys
      <code class="literal">&#039;resource&#039;</code> and <code class="literal">&#039;events&#039;</code>.
      The value of the resource is a (channel) stream or an SSH2 Listener resource.
      The value of the event are SSH2_POLL* flags bitwise ORed together.
      Each subarray will be populated with an <code class="literal">&#039;revents&#039;</code> element on return,
      whose values are SSH2_POLL* flags bitwise ORed together of the events that occurred.
     </p>
    </dd>

   
   
    <dt>
<code class="parameter">timeout</code></dt>

    <dd>

     <p class="para">
      The timeout in seconds.
     </p>
    </dd>

   
  </dl>

 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.ssh2-poll-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   Returns the number of descriptors which returned non-zero revents.
  </p>
 </div>


</div></div></div></body></html>